//
//  tgmodel.m
//  tuangouPak
//
//  Created by student on 16/3/7.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "tgmodel.h"

@implementation tgmodel
- (instancetype)initWithDict:(NSDictionary *)dict
{
    self = [super init];
    if (self)
    {
        [self setValuesForKeysWithDictionary:dict];
    }
    return self;
}

+ (instancetype)tgWithDict:(NSDictionary *)dict
{
    return [[self alloc]initWithDict:dict];
}

+ (NSArray *)tgList
{
    NSString *path = [[NSBundle mainBundle] pathForResource:@"tgs" ofType:@"plist"];
    NSArray *arr = [NSArray arrayWithContentsOfFile:path];
    NSMutableArray *marr = [[NSMutableArray alloc]init];
    for (NSDictionary *tmp in arr)
    {
        tgmodel *m = [tgmodel tgWithDict:tmp];
        [marr addObject:m];
    }
    return marr;
}
@end
